package com.excerise.methods.entity;

/**
 *
 * 方法传参机制
 * @author Way on 2021/7/28
 */
public class MethodParameter {

    public void swap(int a, int b) {
        System.out.printf("\na和b交换之前的值，a = %d, b = %d", a, b);
        int tmp = a;
        a = b;
        b = tmp;
        System.out.printf("\na和b交换之后的值，a = %d, b = %d", a, b);
    }
}
